package com.homedo.odin.solution.dao;

import com.homedo.core.common.base.dao.BaseDao;
import com.homedo.odin.solution.model.entity.UserScoreDetail;
import org.apache.ibatis.annotations.Param;

/**
 * <p> 用户积分明细 Mapper 接口 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public interface UserScoreDetailMapper extends BaseDao<UserScoreDetail> {

    UserScoreDetail selectBySignInAndDate(@Param("userId") Integer userId, @Param("date") String date,
            @Param("type") Integer type);

    Integer selectCountByTypeAndUserId(@Param("userId") Integer userId, @Param("type") Integer type);

    UserScoreDetail findByTodaySingIn(@Param("type") Integer type, @Param("userId") Integer userId);
}